home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
pluginy Firefox
/
1368
/
1368.xpi
/
chrome
/
clrtabs.jar
/
content
/
clrpkr.xul
< prev
next >
Wrap
Extensible Markup Language
|
2008-10-07
|
2KB
|
74 lines
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<dialog
id="clrAppPreferences"
title="Choose Tab Color"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
style="background:#EEEEFF;"
buttons="accept,cancel"
ondialogaccept="return sendClr(1);"
ondialogcancel="return sendClr(0);"
onload="setClrpkr();"
>
<!-- -->
<groupbox id="prefclrpkr" style="background-color: #FFEAFE;">
<description>Select a color.</description>
<colorpicker id="clrpkr" type="button" palettename="standard" onselect="setText();" />
<description>OR</description>
<description tooltiptext="e.g. '#FF88CC' OR 'rgb(255,155,75)'.">Enter color in HEX OR RGB.</description>
<textbox id="clrvalue" size="7" oninput="setClr();" value="#" />
</groupbox>
<script>
<![CDATA[
var color;
function setClrpkr()
{
//alert("loading");
document.getElementById('clrpkr').color = window.arguments[0].inn.oldColor;
//document.getElementById('clrpkr').value = document.getElementById('clrpkr').color;
//document.getElementById('clrvalue').value = document.getElementById('clrpkr').color;
//alert(document.getElementById('clrpkr').value );
color = document.getElementById("clrpkr").color;
document.getElementById("clrvalue").value = color;
}
function setText()
{
color = document.getElementById("clrpkr").color;
document.getElementById("clrvalue").value = color;
//alert(arg1+" "+color);
window.arguments[0].inn.oldColor = color;
//setText();
//document.getAnonymousNodes(arg)[0].style.backgroundColor=color;
//document.getAnonymousNodes(arg)[1].style.backgroundColor=color;
//document.getAnonymousNodes(arg)[2].style.backgroundColor=color;
//document.getAnonymousNodes(arg)[3].style.backgroundColor=color;
}
function setClr()
{
var txt = document.getElementById("clrvalue").value;
document.getElementById("clrpkr").color = txt;
setText();
//
}
function sendClr(st)
{
window.arguments[0].inn.enabled=st;
window.arguments[0].out = {oldColor:window.arguments[0].inn.oldColor, enabled:window.arguments[0].inn.enabled };
return true;
}
]]>
</script>
<script type="application/x-javascript" src="chrome://clrtabs/content/clrtabs.js"/>
</dialog>